package cn.tianya.irock.bll;


import java.util.List;

import cn.tianya.irock.data.dalfactory.DataAccess;
import cn.tianya.irock.data.idal.IPermissionDataProvider;
import cn.tianya.irock.enums.ApplicationType;
import cn.tianya.irock.security.PermissionBase;

public class ForumPermissions {
	private static IPermissionDataProvider provider;

    static {
        provider = DataAccess.createPermissionDataProvider();
    }
    
	public static List<PermissionBase> getPermissions(int siteSettingsId, ApplicationType type) {
		return provider.getPermissions(siteSettingsId, type);
	}
	
	public static PermissionBase getPermission(int settingsId, int sectionId, int roleId) {
		return provider.getPermission(settingsId, sectionId, roleId);
	}
		
	public static void add(List<PermissionBase> permissions) {
		provider.add(permissions);
	}
	
	public static void update(List<PermissionBase> permissions) {
		provider.update(permissions);
	}
	
	public static void delete(List<PermissionBase> permissions) {
		provider.delete(permissions);
	}
}
